// 导入 Joi 来定义验证规则
const joi = require('joi')

// 定义规则
const newpassword = joi.string().alphanum().min(6).max(12).required()
const oldpassword = joi.string().alphanum().min(6).max(12).required()
const describe = joi.string().required()
const email = joi.required()
const status = joi.number().integer().required()
const phone = joi.number().integer().max(11).required()

exports.update_password_schema ={
    body:{
        newpassword,
        oldpassword
    }
}

exports.add_account_schema = {
    body:{
        newpassword,
        oldpassword,
        describe,
        email,
        status,
        phone
    }
}